package features.advance.leetcode.geometry;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;
@Data
public class Node {
    private String nodeName;

    private Node rightNode;

    private Node leftNode;
    public Node(){

    }

    public Node(String nodeName){
        this.nodeName = nodeName;
    }

    public Node(String nodeName,Node leftNode,Node rightNode){
        this.nodeName = nodeName;
        this.leftNode = leftNode;
        this.rightNode = rightNode;
    }

    @Override
    public String toString() {
        return "Node{" +
                "nodeName='" + nodeName + '\'' +
                ", rightNode=" + rightNode +
                ", leftNode=" + leftNode +
                '}';
    }

    public static void main(String[] args) {
        Node node = new Node("1", new Node("2", new Node("3",new Node("l"),new Node("r")),new Node()),new Node("2",new Node(),new Node()));
        System.out.println(JSONObject.toJSONString(node));
    }
}
